<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">layui 后台布局</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->

        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="home.html" target="myframe">主页</a></li>
            <li class="layui-nav-item"><a href="" target="myframe">用户管理</a></li>
            <li class="layui-nav-item"><a href="" target="myframe">用户</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1599069134529&di=fe85021276c9418f6f313e70196f0e3b&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201703%2F28%2F20170328092818_chLXy.thumb.700_0.jpeg"
                         class="layui-nav-img">
                    <span id="name"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="login.html">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item"><a href="home.html" target="myframe">主页</a></li>

                <li class="layui-nav-item">
                    <a href="javascript:;">用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="user/showUser.html" target="myframe">用户查询</a></dd>
                        <dd><a href="user/addUser.html" target="myframe">添加用户</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">部门管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="dept.html" target="myframe">部门管理</a></dd>
                        <dd><a href="addDept.html" target="myframe">添加部门</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">职位管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="job/position.html" target="myframe">职位管理</a></dd>
                        <dd><a href="job/addJob.html" target="myframe">添加职位</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">员工管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="employee.html" target="myframe">员工列表</a></dd>
                        <dd><a href="addemployee.html" target="myframe">添加员工</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">公告管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="notice.html" target="myframe">公告展示</a></dd>
                        <dd><a href="noticeAdd.html" target="myframe">添加公告</a></dd>

                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">下载中心管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">列表一</a></dd>
                        <dd><a href="">超链接</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">签到管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="sign.html" target="myframe">签到查询</a></dd>
                        <dd><a href="signForm.html" target="myframe">签到图表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">工资管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="salaryTable.html" target="myframe">工资报表</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <iframe src="https://tianqiapi.com/api.php?style=tz&skin=pitaya" frameborder="0" width="100%" height="30"
                allowtransparency="true"></iframe>
        <iframe name="myframe" width="100%" height="100%" frameborder="0"
                src="https://www.layui.com/admin/std/dist/views/senior/echarts/map.html"></iframe>

    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
    </div>
</div>
<script src="layui/layui.js"></script>
<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script>
    //JavaScript代码区域
    layui.use(['element', "layer"], function () {
        var element = layui.element;
        layer = layui.layer;

        $.ajax({
            type: "get",
            url: "user/query.do",
            dataType: "json",
            success: function (data) {
                console.log(data)
                if (data.code == 1) {
                    $("#name").html(data.info.username);
                } else {
                    layer.msg("获取数据异常")
                }
            }
        })

    });
</script>
</body>
</html>